package com.example.friend.controller;


import com.example.common.core.controller.BaseController;
import com.example.common.core.domain.Result;
import com.example.message.service.AliSmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class Test extends BaseController {
    @Autowired
    private AliSmsService aliSmsService;

    //获取验证码
    @PostMapping("/sendCode")
    public Result<Void> sendCode(String phone, String code) {
        return toResult(aliSmsService.sendMobileCode(phone, code));
    }
}
